Optimal. Leaf size=50 \[ \frac {1}{2} x \left (a^2+2 b^2\right )+\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {2 a b \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3788, 2637, 4045, 8} \[ \frac {1}{2} x \left (a^2+2 b^2\right )+\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {2 a b \sin (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2637
Rule 3788
Rule 4045
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx &=(2 a b) \int \cos (c+d x) \, dx+\int \cos ^2(c+d x) \left (a^2+b^2 \sec ^2(c+d x)\right ) \, dx\\ &=\frac {2 a b \sin (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} \left (a^2+2 b^2\right ) \int 1 \, dx\\ &=\frac {1}{2} \left (a^2+2 b^2\right ) x+\frac {2 a b \sin (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 46, normalized size = 0.92 \[ \frac {2 \left (a^2+2 b^2\right ) (c+d x)+a^2 \sin (2 (c+d x))+8 a b \sin (c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 40, normalized size = 0.80 \[ \frac {{\left (a^{2} + 2 \, b^{2}\right )} d x + {\left (a^{2} \cos \left (d x + c\right ) + 4 \, a b\right )} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 96, normalized size = 1.92 \[ \frac {{\left (a^{2} + 2 \, b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.56, size = 51, normalized size = 1.02 \[ \frac {a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 \sin \left (d x +c \right ) a b +b^{2} \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 47, normalized size = 0.94 \[ \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} + 4 \, {\left (d x + c\right )} b^{2} + 8 \, a b \sin \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.85, size = 42, normalized size = 0.84 \[ \frac {a^2\,x}{2}+b^2\,x+\frac {a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {2\,a\,b\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cos ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________